using System;
using Google.Protobuf.Collections;
using Smart.Model;
using UnityEngine;

public partial class Net
{
    public static void LoginReqMessage()
    {
        Account.LoginReq req = MessagePool.Instance.Fetch<Account.LoginReq>();
        GameEntry.Instance.Send((int)ECM.LoginReqMessage, req);
    }
	public static void MoveReqMessage(Int64 x,Int64 z, Int64 posX, Int64 posY, Int64 posZ)
	{
		Account.MoveReq req = MessagePool.Instance.Fetch<Account.MoveReq>();
		req.X = x;
		req.Z = z;
		req.Time = GameEntry.TimeManager.GetCurrentServerTime();
		req.StartX = posX;
		req.StartY = posY;
		req.StartZ = posZ;
		GameEntry.Instance.Send((int)ECM.MoveReqMessage,req);
	}
	public static void AddTempObstacleReqMessage()
	{
		Account.AddTempObstacleReq req = MessagePool.Instance.Fetch<Account.AddTempObstacleReq>();
		GameEntry.Instance.Send((int)ECM.AddTempObstacleReqMessage,req);
	}
	public static void RemoveTempObstacleReqMessage()
	{
		Account.RemoveTempObstacleReq req = MessagePool.Instance.Fetch<Account.RemoveTempObstacleReq>();
		GameEntry.Instance.Send((int)ECM.RemoveTempObstacleReqMessage,req);
	}
	public static void MoveStopReqMessage()
	{
		Account.MoveStopReq req = MessagePool.Instance.Fetch<Account.MoveStopReq>();
		GameEntry.Instance.Send((int)ECM.MoveStopReqMessage,req);
	}
	
	public static void TimeSynReqMessage()
	{
		Account.TimeSynReq req = MessagePool.Instance.Fetch<Account.TimeSynReq>();
		GameEntry.Instance.Send((int)ECM.TimeSynReqMessage,req);
	}
}
